Release 10.1A: OpenEdge Application Server:
Developing AppServer Applications
Running asynchronous requests on the SESSION system handle
You can execute a
RUN...ASYNCHRONOUSstatement using a server object handle or aSESSIONsystem handle. If you use aSESSIONhandle, the request is executed synchronously on the client as if it was called using a synchronousRUNstatement. However, unlike a standard synchronous procedure call that returns the results directly to theRUNstatement, the results are returned by the event procedure specified on theRUN...ASYNCHRONOUSstatement as though it were responding to aPROCEDURE-COMPLETEevent from an AppServer.Thus, using the
Note: In addition to order of execution, using theSESSIONhandle, the event procedure runs synchronously as part of theRUNstatement and returns execution to the statement immediately following the sameRUNstatement. This is different from using a server handle, where the event procedure runs only in the context of a blocking I/O orPROCESSEVENTSstatement that processes thePROCEDURE-COMPLETEevent. However, this still allows you to use theRUN...ASYNCHRONOUSstatement to program local and remote requests in a similar way, for example, when an AppServer is not available.SESSIONhandle to run an asynchronous request as a local synchronous request results in error handling that is slightly different from using a server handle. For this reason, you might want to develop using a local AppServer when a network AppServer is not available. For more information on running a local AppServer, see OpenEdge Application Server: Administration . For more information on error handling when using theSESSIONhandle, see theRUNstatement entry in OpenEdge Development: Progress 4GL Reference .
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |